package cn.edu.scau.cmi.liquan.exercise10.Example10_17;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Fenxi {
	public static double getTotalScore(String s) {
		Scanner scanner=new Scanner(s);
		scanner.useDelimiter("[^0123456789.]+");
		double totalScore=0;
		while(scanner.hasNext()) {
			try {
				double score=scanner.nextDouble();
				totalScore = totalScore + score;
			}
			catch (InputMismatchException e) {
				// TODO: handle exception
				String t=scanner.next();
			}
		}
		return totalScore;
	}
}
